import hyRequest from "@/service"

export function getKey() {
  return hyRequest.get({
    url: "/login/qr/key",
    params: {
      timestamp: Date.now()
    }
  })
}

export function getQRCode(unikey: string) {
  return hyRequest.get({
    url: "/login/qr/create",
    params: {
      key: unikey,
      qrimg: true,
      timestamp: Date.now()
    }
  })
}

export function checkQRCode(unikey: string) {
  return hyRequest.get({
    url: "/login/qr/check",
    params: {
      key: unikey,
      timestamp: Date.now()
    }
  })
} 